package com.slink.fxfk.demo.action;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.slink.fxfk.demo.service.DemoService;


@Controller
@RequestMapping("/demo")
public class DemoAction
{
    @Autowired
    private DemoService demoService;
    
    public DemoAction()
    {
        System.out.println("init.....");
    }

    @RequestMapping(value = "/db")
    public void testDb() throws Exception
    {
        this.demoService.createDbTrans();
    }

    @RequestMapping(value = "/webtest")
    public ModelAndView webTest(HttpServletRequest request)
    {
        ModelAndView mv = new ModelAndView("/webtest");
        return mv;
    }
}
